package com.alibaba.nacos.core.remote;

import com.alibaba.nacos.api.remote.Requester;
import com.alibaba.nacos.api.remote.request.ServerRequest;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;

import java.util.Map;

@Setter
@Getter
@RequiredArgsConstructor
public abstract class Connection
        implements Requester {
    private Map<String, Boolean> abilityTable;
    private final ConnectionMeta metaInfo;

    public abstract boolean isConnected();

    public void close() {

    }

    public void freshActiveTime() {
        this.metaInfo.setLastActiveTime(System.currentTimeMillis());
    }

}
